<?php

namespace app\modules\groups\models;

use Yii;

/**
 * This is the model class for table "{{%gxc_group}}".
 *
 * @property integer $groupID
 * @property string $groupName
 * @property string $groupCode
 * @property integer $parentGroupID
 * @property string $groupDesc
 * @property integer $oldGroupID
 * @property integer $status
 * @property string $group_mark
 * @property string $createTime
 * @property string $updateTime
 * @property string $createUser
 * @property string $updateUser
 * @property string $groupStr
 */
class Group extends \yii\db\ActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
         return '{{%group}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['parentGroupID', 'oldGroupID', 'status'], 'integer'],
            [['createTime', 'updateTime'], 'safe'],
            [['groupName', 'group_mark'], 'string', 'max' => 50],
            [['groupCode', 'groupStr'], 'string', 'max' => 100],
            [['groupDesc'], 'string', 'max' => 200],
            [['createUser', 'updateUser'], 'string', 'max' => 20],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'groupID' => Yii::t('app', 'groupID'),
            'groupName' => Yii::t('app', 'groupName'),
            'groupCode' => Yii::t('app', '组织代码'),
            'parentGroupID' => Yii::t('app', 'parentGroupID'),
            'groupDesc' => Yii::t('app', 'groupDesc'),
            'oldGroupID' => Yii::t('app', 'Old Group ID'),
            'status' => Yii::t('app', '状态'),
            'group_mark' => Yii::t('app', 'group_mark'),
            'createTime' => Yii::t('app', '创建日期'),
            'updateTime' => Yii::t('app', '更新日期'),
            'createUser' => Yii::t('app', '创建用户'),
            'updateUser' => Yii::t('app', 'Update User'),
            'groupStr' => Yii::t('app', 'Group Str'),
        ];
    }
}
